// Fill out your copyright notice in the Description page of Project Settings.


#include "UI/TUSpectorWidget.h"
#include "TUUtils.h"
#include "Component/TURespawnComponent.h"

bool UTUSpectorWidget::GetRespawnTime(int32& CountDownTime) const
{
    const auto RespawnComponent = TUUtils::GetTUPlayerComponent<UTURespawnComponent>(GetOwningPlayer());
    if (!RespawnComponent || !RespawnComponent->IsRespawnInProgress()) return false;

    CountDownTime = RespawnComponent->GetRespawnCountDown();
    return true;
}

